package com.zh.elec.dao.impl;

import java.util.List;

import com.zh.elec.dao.DealerDao;
import com.zh.elec.dao.base.BaseDao;
import com.zh.elec.model.Dealer;

/**
 * 经销商
 * @author scy
 *
 */
public class DealerDaoImpl extends BaseDao implements DealerDao {

	@Override
	public Object save(Dealer obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object update(Dealer obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object getObjById(Dealer obj) {
		return this.getObjById(obj);
	}

	@Override
	public Object del(Dealer obj) {
		return this.del(obj);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Dealer> findByHql(String hql) {
		return this.find(hql);
	}

	@Override
	public List<Dealer> findByName(String name, Object value) {
		return this.findByName(name, value);
	}

	@Override
	public List<Dealer> findAll() {
		return this.findByHql(" from Dealer ");
	}
}
